<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<title>用户列表</title>
	</head>
	<body>
		<form action="<c:url value='/account/user.do'/>" method="post">
			<table class="table-layout">
				<tr class="tr-odd">
					<td class="td-label">
						登录名或昵称:
					</td>
					<td>
						<input type="text" name="filter_LIKES_loginName_OR_otherName" value="<c:out value="${filters.LIKES_loginName_OR_otherName}" />" />
					</td>
				</tr>
				<tr class="tr-even">
					<td class="td-label">
						邮箱:
					</td>
					<td>
						<input type="text" name="filter_LIKES_contact_email" value="<c:out value="${filters.LIKES_contact_email}" />" />
					</td>
				</tr>
			</table>
			<br />
			<div class="right-opertion">
				<input type="button" value="搜索" onclick="search(this);" class="button" />
			</div>
			<br />
			<table class="table-layout">
				<tr class="tr-thead">
					<th>
						<a href="javascript:void(0);" onclick="javascript:sort('id',this)">ID</a>
					</th>
					<th>
						<a href="javascript:void(0);" onclick="javascript:sort('loginName',this)">姓名</a>
					</th>
					<th>
						<a href="javascript:void(0);" onclick="javascript:sort('loginPassword',this)">密码</a>
					</th>
					<th>
						<a href="javascript:void(0);" onclick="javascript:sort('otherName',this)">昵称</a>
					</th>
					<th>
						<a href="javascript:void(0);" onclick="javascript:sort('contact_email',this)">邮箱</a>
					</th>
					<th>
						操作
					</th>
				</tr>
				<logic-el:iterate name="page" property="result" id="user" indexId="index">
					<tr class="<c:if test="${index % 2 == 0}">tr-odd</c:if><c:if test="${index % 2 == 1}">tr-even</c:if>">
						<td>
							<c:out value="${user.id}" />
							&nbsp;
						</td>
						<td>
							<a href="<c:url value='user.do?method=view&id=${user.id}'/>"><c:out value="${user.loginName}" /></a>
							&nbsp;
						</td>
						<td>
							<c:out value="${user.loginPassword}" />
							&nbsp;
						</td>
						<td>
							<c:out value="${user.otherName}" />
							&nbsp;
						</td>
						<td>
							<c:out value="${user.contact.email}" />
							&nbsp;
						</td>
						<td>
							<a href="<c:url value='user.do?method=edit&id=${user.id}'/>">修改</a>&nbsp; <a href="javascript:void(0)" onclick="if(confirm('确定要删除该记录吗？')) location.href='<c:url value='user.do?method=erase&id=${user.id}'/>'">删除</a>&nbsp;
						</td>
					</tr>
				</logic-el:iterate>
			</table>
			<page:page name="page" />
		</form>
		<br />
		<div class="center-opertion">
			<button onclick="location.href='user.do?method=edit'" class="button">
				添加
			</button>
		</div>
	</body>
</html>
